package com.dhecp.project.purchase.mapper;

import java.util.List;
import java.util.Map;

import com.dhecp.core.genericDao.GenericDao;
import com.dhecp.project.common.domain.UpdateDeleted;
import com.dhecp.project.common.domain.UpdateFlow;
import com.dhecp.project.purchase.domain.PurchaseOrder;
import com.dhecp.project.purchase.domain.Refund;

public interface PurchaseOrderMapper extends GenericDao<PurchaseOrder, String> {

    /**
     *@Description: 修改删除标志（仅需 guid 和 deleted）
     *@Param: [updateDeleted]
     *@return: int
     *@Author: hlf
     *@date: 2022-05-09 10:13
     */
    int updateDeleted(UpdateDeleted updateDeleted);

    /**
     *@Description: 修改流程状态及生效标志（仅需 guid、activeFlow、effectStock、updateTime）
     *@Param: [updateFlow]
     *@return: int
     *@Author: hlf
     *@date: 2022-05-09 10:13
     */
    int updateFlow(UpdateFlow updateFlow);

    PurchaseOrder findByBID(String bid);


    List<PurchaseOrder> findByPlanID(String planID);

    List<PurchaseOrder> isAllAudit(String[] ids);

    /**
     * 查询已选择的商品数据
     * @param params
     * @return
     */
    List<PurchaseOrder> querySelectList(Map<String, Object> params);

    List<Refund> querySonListByBID(Map<String, Object> params);
    
    /**
    *@Description: 查询全部采购订单
    *@Param: [params]
    *@return: java.util.List<com.dhecp.project.purchase.domain.PurchaseOrder>
    *@Author: hlf
    *@date: 2022-12-02 16:48
    */
    List<PurchaseOrder> selectAllOrder(Map<String, Object> params);

    List<PurchaseOrder> selectAllOrder2(Map<String, Object> params);

    /**
    *@Description: 导出专用查询
    *@Param: [params]
    *@return: java.util.List<com.dhecp.project.purchase.domain.PurchaseOrder>
    *@Author: hlf
    *@date: 2022-12-02 16:48
    */
    List<PurchaseOrder> queryExportList(Map<String, Object> params);


    /**
    *@Description: 生成入库单
    *@Param: [purchasePlan]
    *@return: int
    *@Author: hlf
    *@date: 2023-01-11 15:52
    */
    int createOrder(PurchaseOrder purchaseOrder);

}
